package cs.lqs.service.impl;

import cs.lqs.dao.BillMapper;
import cs.lqs.entity.Bill;
import cs.lqs.service.BillService;
import cs.lqs.vo.BillVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class BillServiceImpl implements BillService {

    @Resource
    private BillMapper billMapper;

    /**
     * 查询账单列表
     * @param billVo
     * @return
     */
    public List<Bill> findBillList(BillVo billVo) {
        return billMapper.findBillList(billVo);
    }

    /**
     * 添加账单
     * @param bill
     * @return
     */
    public int addBill(Bill bill) {
        return billMapper.addBill(bill);
    }

    /**
     * 修改账单
     * @param bill
     * @return
     */
    public int updateBill(Bill bill) {
        return billMapper.updateBill(bill);
    }

    /**
     * 根据id删除账单
     * @param id
     * @return
     */
    public int deleteById(Integer id) {
        return billMapper.deleteById(id);
    }
}




























